import request from "@/util/request";

export default {
    // 1. 查询
    findAllEmployee() {
        return request({
            url: "/employee/list",
            method: "get"
        })
    },
    // 2. 分页查询
    findByPage(page, pageSize) {
        return request({
            url: `/employee/findByPage/${page}/${pageSize}`,
            method: "get"
        })
    },
    // 3. 条件查询带分页
    search(page, pageSize, data) {
        return request({
            url: `/employee/search/${page}/${pageSize}`,
            method: "post",
            data
        })
    },
    //4.保存
    save(data) {
        return request({
            url: '/employee/save',
            method: "post",
            data
        })
    },
    //5.编辑
    edit(data) {
        return request(({
            url: '/employee/update',
            method: "put",
            data
        }))
    },
    //6.逻辑删除
    del(ids) {
        return request(({
            url: `/employee/delete/${ids}`,
            method: "delete",
        }))
    }
}
